import request from '@/utils/request'

// 查询药物频率列表
export function listFrequency(query) {
  return request({
    url: '/system/frequency/list',
    method: 'get',
    params: query
  })
}

// 查询药物频率详细
export function getFrequency(drugFrequencyId) {
  return request({
    url: '/system/frequency/' + drugFrequencyId,
    method: 'get'
  })
}

// 新增药物频率
export function addFrequency(data) {
  return request({
    url: '/system/frequency',
    method: 'post',
    data: data
  })
}

// 修改药物频率
export function updateFrequency(data) {
  return request({
    url: '/system/frequency',
    method: 'put',
    data: data
  })
}

// 删除药物频率
export function delFrequency(drugFrequencyId) {
  return request({
    url: '/system/frequency/' + drugFrequencyId,
    method: 'delete'
  })
}
